package logic_setting_user

import (
	v1 "Sailor/app/Sailor-console-server/api/api_setting_user/v1"
	"Sailor/app/Sailor-console-server/internal/dao"
	"context"
	"github.com/gogf/gf/v2/errors/gerror"
	"github.com/gogf/gf/v2/frame/g"
)

func (s *sSettingUser) LogicSettingUserDelete(ctx context.Context, req *v1.SettingUserDeleteReq) (res *v1.SettingUserDeleteRes, err error) {

	g.Dump(req.Uuid)

	_, err = dao.SysUser.Ctx(ctx).Where(dao.SysUser.Columns().Uuid, req.Uuid).Delete()
	if err != nil {
		g.Log().Error(ctx, err)
		return nil, gerror.New("删除失败")
	}
	return &v1.SettingUserDeleteRes{}, nil
}
